QuickTime 3 Reference

| Previous | Chapter Contents | Chapter Top | Next |

Parameter Data Range

The Parameter Data Range atom defines the legal range of values that the parameter can take. It also defines a scaling constant that defines how the legal range of values can be translated into a range that is more suitable for display in a user interface.

The atom's data is structured as a RangeRecord , defined below. The exact format of this data depends on the data type of the parameter being described.

// 'text'
typedef struct
{
    long    maxChars;   // Maximum length of the string
    long    maxLines;   // Number of editing lines (typically 1)
} StringRangeRecord;

// 'long'
typedef struct
{
    long            minValue;           // Minimum value the long can be
    long            maxValue;           // Maximum value the long can be
    long            scaleValue;         // Scaling constant
    long            precisionDigits;    // number of digits of precision
                                        // when editing via typing
} LongRangeRecord;

// 'enum'
typedef struct
{
    long            enumID;         // The ID of the 'enum' atom in the
                                    // root container to search
} EnumRangeRecord;

// 'fixd'
typedef struct
{
    Fixed           minValue;           // Minimum value the Fixed can be
    Fixed           maxValue;           // Maximum value the Fixed can be
    Fixed           scaleValue;         // Scaling constant
    long            precisionDigits;    // number of digits of precision
                                        // when editing via typing
} FixedRangeRecord;

// 'doub'
typedef struct
{
    QTFloatDouble   minValue;           // Minimum value of parameter
    QTFloatDouble   maxValue;           // Maximum value of parameter
    QTFloatDouble   scaleValue;         // Scaling constant
    long            precisionDigits;    // number of digits of precision
                                        // when editing via typing
} DoubleRangeRecord;

// 'bool'
typedef struct
{
    long            maskValue;  // value to mask on/off to set/clear the
                                // boolean
} BooleanRangeRecord;


// 'rgb '
typedef struct
{
    RGBColor    minColor;       // Minimum value the RGBColor can be
    RGBColor    maxColor;       // Maximum value the RGBColor can be
} RGBRangeRecord;

// The RangeRecord data structure is the union of all of the above
typedef struct
{
    union
    {
        LongRangeRecord         longRange;
        EnumRangeRecord         enumRange;
        FixedRangeRecord        fixedRange;
        DoubleRangeRecord       doubleRange;
        StringRangeRecord       stringRange;
        BooleanRangeRecord      booleanRange;
        RGBRangeRecord          rgbRange;
    } u;
} RangeRecord;

The minValue and maxValue fields of the DoubleRangeRecord data structure can take, in addition to an actual QTFloatDouble value, the following predefined values:

The minValue and MaxValue fields of the LongRangeRecord data structure can take, in addition to an actual long integer value, the following predefined values:

The Parameter Data Range atom is required, except for group descriptions.


© 1998 Apple Computer, Inc.

| Previous | Chapter Contents | Chapter Top | Next |